home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / hardware / ahd12 / sec / sec.c < prev   
C/C++ Source or Header  |  2000-02-28  |  364b  |  26 lines

  1. typedef unsigned long ULONG;
  2.  
  3. int readhardsec(void *, ULONG, ULONG);
  4.  
  5. short buf[256];
  6.  
  7. void
  8. main()
  9.    {
  10.    long i;
  11.  
  12.    i = 0;
  13.    readhardsec(buf, 0L, 512L);
  14.    buf[2] = 30;
  15.    hdconfig(buf);
  16.  
  17.    while(readhardsec(buf, i<<9, 512L) == 0)
  18.       {
  19.       printf("Read %d ok\r", i);
  20.       i++;
  21.       if(i > 64) break;
  22.       }
  23.    printf("\nUse %d as track#\n", i);
  24.    }
  25.  
  26.